<template>
	<view>

		<view class="title">
			<u-row style="padding-top: 25rpx;">
				<view style="font-size: 38rpx;">
					<text>{{Data.courseNoticeTitle}} </text>
				</view>
			</u-row>
			<u-row style="padding-top: 10rpx;" v-if="show">
				<view style="font-size: 85%; color: #909399;">
					<!-- {{(Data.releaseTime).slice(0,4) + "年" + (Data.releaseTime).slice(4,6) + "月" + (Data.releaseTime).slice(6,8) + "日 " + (Data.releaseTime).slice(8,10) + ":" + (Data.releaseTime).slice(10,12) + ":" + (Data.releaseTime).slice(12,14)}} -->
					{{(Data.releaseTime).slice(0,4) + "-" + (Data.releaseTime).slice(4,6) + "-" + (Data.releaseTime).slice(6,8) + "  " + (Data.releaseTime).slice(8,10) + ":" + (Data.releaseTime).slice(10,12) + ":" + (Data.releaseTime).slice(12,14)}}
				</view>
			</u-row>
		</view>
		<!-- <u-divider>内容</u-divider> -->

		<u-row style="margin-bottom: 30rpx;">
			<u-col style="padding-top: 40rpx; padding-left: 20rpx; padding-right: 20rpx; font-size: 120%;"> <text>{{Data.courseNotice}}</text></u-col>
		</u-row>

	</view>
</template>

<script>
	import {
		getCourseNotice
	} from "@/api/modules/course.js"
	export default {
		data() {
			return {
				courseId: '',
				id: "",
				courseNoticeData: [],
				Data: {},
				show: false,
			}
		},
		onLoad(res) {
			this.id = res.id
			let that = this;
			let data = {
				courseInfoId: res.courseId
			}
			getCourseNotice(data)
				.then(resp => {
					// console.log(resp)
					this.courseNoticeData = resp.data
					for (var i = 0; i < this.courseNoticeData.length; i++) {
						if (this.courseNoticeData[i].id == res.id)
							// console.log(this.courseNoticeData[i].id)
							this.Data = this.courseNoticeData[i]
					}
					that.show = true
				})
				.catch(resp => {})

			// console.log(111)

		},
		methods: {

		}
	}
</script>

<style scoped>
	.title {
		background-color: #f1f1f1;
		height: 150rpx;
		padding-left: 30rpx;
	}

	.subT {
		margin-top: 30rpx;
		height: 60rpx;
	}

	.text {
		padding-left: 20rpx;
		padding-right: 20rpx;
		padding-top: 40rpx;
	}
</style>
